#ifndef _MESSAGE_H
#define _MESSAGE_H
#include <string>
using std::string;

enum TaskType
{
    TASK_TYPE_LOGIN_SECTION1 = 1,
    TASK_TYPE_LOGIN_SECTION1_RESP_OK,
    TASK_TYPE_LOGIN_SECTION1_RESP_ERROR,
    TASK_TYPE_LOGIN_SECTION2,
    TASK_TYPE_LOGIN_SECTION2_RESP_OK,
    TASK_TYPE_LOGIN_SECTION2_RESP_ERROR,
    TASK_TYPE_REGISTER1,
    TASK_TYPE_REGISTER1_RESP_OK,
    TASK_TYPE_REGISTER1_RESP_ERROR,
    TASK_TYPE_REGISTER2,
    TASK_TYPE_REGISTER2_RESP_OK,    // 用户注册成功
    TASK_TYPE_REGISTER2_RESP_ERROR, // 用户注册失败
};

struct Packet
{
    int _type;
    int _length;
    string _msg;
};

struct TLV
{
    int _type;
    int _length;
    char data[1024];
};

#endif
